def return_diff_type_value(a):
    if a == 1:
        return 1
    elif a == 2:
        return 2.2
    elif a == 3:
        return 'hello'
    elif a == 4:
        return [1, 2, 3]
    else:
        return {"a": 1, "b": 2}


class SharePropertyData:
    """
    共享属性数据
    """
    VALUE_TYPE_TEXT = 'text'  # 用户手输入的text
    VALUE_TYPE_INT = 'int'  # 值为int
    VALUE_TYPE_STATIC_P_ID = 'static_p_id'  # 静态属性uuid
    VALUE_TYPE_BOOL = 'bool'  # 布尔类型
    VALUE_TYPE_STATIC_DATA_ID = "static_data_id"  # 在data文件中存储的数据

    # FIELD COMMENT
    FIELD_COMMENT_PARENT_ID = 'parent_id'  # field1字段, 存储的是该条记录的parent_id


if __name__ == '__main__':
    # nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    # even_nums_square = [i * i for i in nums if i % 2 == 0]
    # print('type of even_nums_square is', type(even_nums_square))
    # print(even_nums_square)

    # a = 1
    # b = 2
    # a, b = b, a
    # print('a', a)
    # print('b', b)
    # return_val = return_diff_type_value(100)
    # print("type of return_val", type(return_val))
    tuple1 = (1, 2, [3, 4, 5])
    # 报错
    # tuple1[0] = 6
    # python中index=-1表示最后一个元素。这样可以，类似于Java中用final修饰的引用，引用不可变，但是引用指向的数据可以修改
    tuple1[-1][0] = 6
    for t in tuple1:
        print(t)

    # PROPERTIES_TEXT = ['CROP_IMAGE_ID', 'CROP_IMAGE', 'SEQUENCE_NUM', 'ELEMENT_THEME_1']
    # VALUE_TYPE = {
    #     i: SharePropertyData.VALUE_TYPE_TEXT
    #     for i in PROPERTIES_TEXT
    # }
    # print(VALUE_TYPE['CROP_IMAGE_ID'])


